
#include "cn_jni_test_MainClass.h"
#include <iostream>
using namespace std;

/*
 * Class:     cn_jni_test_MainClass
 * Method:    outputData
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_cn_jni_test_MainClass_outputData
  (JNIEnv * env, jclass)
{

#if 1
	jclass clazz_date = env->FindClass("java/util/Date");
	jmethodID mid_date_con = env->GetMethodID(clazz_date, "<init>", "()V");

	jobject obj_now = env->NewObject(clazz_date, mid_date_con);

	jmethodID mid_date_getTime = env->GetMethodID(clazz_date, "getTime", "()J");
	jlong time = env->CallLongMethod(obj_now, mid_date_getTime);

	cout << time << endl;
#endif

}

/*
 * Class:     cn_jni_test_MainClass
 * Method:    outputData1
 * Signature: (Ljava/lang/String;)I
 */
JNIEXPORT jint JNICALL Java_cn_jni_test_MainClass_outputData1
  (JNIEnv *, jclass, jstring)
 {
	 return 2;
}